package pattern24.people2;

/**
 * 访问者模式写的
 *
 * @author wdl
 */
public class People2 {
    public static void main(String[] args) {
        //对象结构中加入需要对比的男人和女人
        ObjectStructure objectStructure = new ObjectStructure();
        objectStructure.attach(new Man());
        objectStructure.attach(new Woman());

        Success success = new Success();
        objectStructure.display(success);

        Failing failing=new Failing();
        objectStructure.display(failing);

        Amativeness amativeness=new Amativeness();
        objectStructure.display(amativeness);
    }
}
